<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css"
	rel="stylesheet" media="screen">
<script src="${pageContext.request.contextPath}/js/jquery-1.11.0.js"
	type="text/javascript" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
<style type="text/css">
body {
	padding-top: 20px;
	padding-bottom: 40px;
}

/* Custom container */
.container-narrow {
	margin: 0 auto;
	max-width: 700px;
}

.container-narrow>hr {
	margin: 30px 0;
}

/* Main marketing message and sign up button */
.jumbotron {
	margin: 60px 0;
	text-align: center;
}

.jumbotron h1 {
	font-size: 72px;
	line-height: 1;
}

.jumbotron .btn {
	font-size: 21px;
	padding: 14px 24px;
}

/* Supporting marketing content */
.marketing {
	margin: 60px 0;
}

.marketing p+h4 {
	margin-top: 28px;
}
</style>

</head>

<body>

	<div class="container-narrow">

		<div class="masthead">
			<ul class="nav nav-pills pull-right">
				<c:if test="${user eq null }">
					<li><a href="login.jsp"
						style="color: #4876FF; text-decoration: none">登录</a></li>
					<li><a href="register.jsp"
						style="color: #4876FF; text-decoration: none">注册</a></li>
				</c:if>
				<c:if test="${user ne null }">

					<c:if test="${user.image eq null }"></c:if>
					<c:if test="${user.image ne null }">
						<li><img
							src="${pageContext.request.contextPath}/img/${user.image}"
							width="40px" height="40px" class="img-rounded" /></li>
					</c:if>
					<li><a href="#" style="color: #4876FF; text-decoration: none">${user.username}</a></li>
					<li><a href="login?op=myself&userid=${user.userid }"
						style="color: #4876FF; text-decoration: none">个人中心</a></li>
					<li><a href="main.jsp"
						style="color: #4876FF; text-decoration: none">注销</a></li>
				</c:if>
			</ul>
			<h3 class="muted">The article management</h3>
		</div>

		<hr>

		<div class="jumbotron">
			<h2>欢迎来到阅读之家</h2>
			<p class="lead" style="font-family: '楷体';">欢迎来到阅读之家，这里拥有全世界的书籍，在这里拥有非常棒的体验，希望您会喜欢这里。</p>
			<a class="btn btn-large btn-success">发表文章</a>
		</div>

		<hr>

		<div border="1px" id="p1" width="1000px">
			<div id="p3">
				<h2 align="center">欢迎使用查询功能(注：可以查询指定日期之前的文章&点击量>?的文章)</h2>
				<form action="Fenye" method="get" id="frm">
					作者 <input type="text" name="user"> 书名 <input type="text"
						name="aname"> 文章内容 <input type="text" name="content">
					点击量 <input type="text" name="fans"> 发表日期 <input
						type="date" name="date" /> <input type="submit" value="查询"><br>
					<input type="hidden" id="hidPageNum" name="pageNum"
						value="${pageNum }">
			</div>
			<br>
			<br>
			<br>
			<table border="1px" align="center" width="1000px">
				<tr>
					<td>作者</td>
					<td>书名</td>
					<td>文章内容</td>
					<td>点击量</td>
					<td>发表日期</td>
				</tr>
				<c:forEach items="${page.data}" var="article">
					<tr>
						<td>${article.user}</td>
						<td>${article.aname}</td>
						<td>${article.content}</td>
						<td>${article.fans}</td>
						<td>${article.date}</td>
						<td>
							<!-- <a href = "all?pid=${products.pid}&option=edit" onclick=" return confirm('确认要进行数据修改吗?')" >编辑</a> -->
							<a href="#" onclick=" return confirm('点我进去看看')">点我进去看看</a>
						</td>
					</tr>
				</c:forEach>
			</table>

			<h2>总记录数${page.total}</h2>
			<!-- 遍历page.bar -->
			<c:forEach items="${page.bar }" var="i">
				<!-- <a href=""?pageNum=${page.bar }>第i页</a> -->
				<a href="Fenye?currentPage=${i }">第${i }页</a>
			</c:forEach>
</body>

<hr>

<div class="footer">
	<p>&copy; Company 2013阅读之家</p>
</div>

</div>
<!-- /container -->

</body>
</html>
